import 'dart:math';

import 'package:flutter/material.dart';

class CirclePosition extends StatelessWidget {
    
    final double radius;
    final double angle;
    final Widget child;
    
    const CirclePosition({Key key, this.radius, this.angle, this.child}) : super(key: key);
    
    @override
    Widget build(BuildContext context) {
        double x = cos(angle) * radius;
        double y = sin(angle) * radius;
        
        return Transform(
            transform: Matrix4.translationValues(x, y, 0),
            child: child,
        );
    }
}
